let {SyncHook,HookMap} = require('tapable');
const map = new HookMap(()=>new SyncHook(['name']));

//map是用来批量创建钩子的 key是字符串 值是一个钩子hook
map.for("key1").tap('plugin1',(name)=>console.log(1,name));
map.for("key1").tap('plugin2', (name) => console.log(1, name));